package com.cn.zmc.design.template.service.impl;

import com.cn.zmc.design.template.service.TemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public abstract class AbstractTemplateService implements TemplateService {


    @Autowired
    private OtherTemplateMethod otherTemplateMethod;

    @Override
    public void invoke() {
        otherTemplateMethod.merge();
        commend();
        template();
    }


    abstract void template();

    public void commend() {
        System.out.println("通用逻辑");
    }

}
